<!DOCTYPE html>
<html>
<head>
    <title>发送邮件</title>
    <!-- Include Flask-Bootstrap CSS -->
    {% block styles %}
        <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css">

    {% endblock %}
</head>
<body>
<div class="container mt-4">
    <h1 class="mb-4">发送邮件</h1>
    {% with messages = get_flashed_messages() %}
        {% if messages %}
            <div class="alert alert-success">
                <ul>
                    {% for message in messages %}
                        <li>{{ message }}</li>
                    {% endfor %}
                </ul>
            </div>
        {% endif %}
    {% endwith %}
    <form method="post" action="/">
        <!-- Use Bootstrap form classes -->
        <div class="form-group">
            <label for="recipient">收件人地址:</label>
            <input type="email" class="form-control" id="recipient" name="recipient" required>
        </div>

        <div class="form-group">
            <label for="subject">主题:</label>
            <input type="text" class="form-control" id="subject" name="subject" required>
        </div>

        <div class="form-group">
            <label for="body">正文:</label>
            <textarea class="form-control" id="body" name="body" rows="4" required></textarea>
        </div>

        <button type="submit" class="btn btn-primary" style="margin-top: 20px">发送邮件</button>
    </form>
</div>
<!-- Include Bootstrap JavaScript -->
{% block scripts %}
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>

{% endblock %}
</body>
</html>
